from kafka import KafkaProducer

producer = KafkaProducer(bootstrap_servers=['hadoop000:9092'])
future = producer.send('test_monitor_tendency', key=b'my_key', value=b'my_value', partition=0)
result = future.get(timeout=10)
print(result)
